<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" th:href="@{/layui/dist/css/layui.css}">
    <link rel="stylesheet" th:href="@{/layui/dist/css/view.css}"/>
    <title>添加管理员</title>
</head>
<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-row" style="width: 70%;margin: 0 auto;">
            <div class="layui-card" style="margin: 70px;">
                <div class="layui-card-header" style="font-size: 30px;">添加管理员</div>
                <form class="layui-form layui-card-body" th:action="@{/addAdmin}" method="post">
                  <div class="layui-form-item">
                    <label class="layui-form-label">管理员账号</label>
                    <div class="layui-input-block">
                      <input type="text" name="adminNo" th:value="${adminNo}" readonly required  lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">管理员姓名</label>
                    <div class="layui-input-block">
                      <input type="text" name="adminName" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input" width="60%">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile" required  lay-verify="required" placeholder="请输入联系方式" autocomplete="off" class="layui-input" width="60%">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">密码框</label>
                    <div class="layui-input-inline">
                      <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" value="123456">
                    </div>
                    <div class="layui-form-mid layui-word-aux">默认为123456</div>
                  </div>
                  <div class="layui-form-item" style="height: 200px;">
                    <label class="layui-form-label">管理员权限</label>
                    <div class="layui-input-block">
                      <select name="right" lay-verify="required">
                        <option value=""></option>
                        <option th:value="1" value="1">超级管理员</option>
                        <option  th:value="2" value="2">普通管理员</option>
                      </select>
                    </div>
                  </div>

                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn layui-btn-blue" lay-submit lay-filter="formDemo" type="submit" onclick="exit()">确定</button>
                      <button type="reset" class="layui-btn layui-btn-primary" onclick="exit()">返回</button>
                    </div>
                  </div>
                </form>  
            </div>
        </div>
    </div>
    <script th:src="@{/layui/dist/layui.all.js}"></script>
    <script th:src="@{/js/jquery.min.js}" charset="utf-8"></script>
    <script>
      var form = layui.form
        ,layer = layui.layer;
    </script>
    <script type="text/javascript">
        function exit() {
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
        }
    </script>
</body>
</html>